package com.le.tester.onjava8.l1_2;

/**
 * createTime：2022/10/20 14:47
 * description：
 */
public enum OzWhich {
    WEST("west"),
    NORTH("north"),
    EAST("east"),
    SOUTH("south");

    private String desc;

    //私有的构造器,enum的构造器默认是私有的
    private OzWhich(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public static void main(String[] args) {
        for (OzWhich ozItem : OzWhich.values()) {
            System.out.println(ozItem + ":" + ozItem.getDesc());
        }
    }
}
